package com.brillilab.dao.mapper.team;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brillilab.domain.po.team.TeamMember;
import com.brillilab.domain.vo.team.TeamMemberVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 研究团队成员 Mapper 接口
 * </p>
 *
 * @author WuMenghao
 * @since 2019-03-02
 */
public interface TeamMemberMapper extends BaseMapper<TeamMember> {

    int insertBatch(@Param("members") List<TeamMember> teamMembers);

    int updateBatch(@Param("members") List<TeamMember> teamMembers,@Param("teamId") Long teamId);

    List<TeamMemberVo> selectTeamMemberVoList(@Param("teamId") Long teamId,@Param("state")Integer state);

    TeamMemberVo selectLeader(Long teamId);

    //根据团队id将团队成员的状态修改为已移出
    int updateTeamMemberState(Long teamId);

    List<Long> getTeamLabMemberIds(@Param("teamId") Long teamId);

    List<Long> getNoTeamLabMemberIds(@Param("labId") Long labId);
}
